{# This templates is used to display results when searching remote objects,
 # for example actors.
 #}

<table class="table-sm table-borderless">
    <thead>
        <tr>
            <th scope="col"></th>
            <th scope="col"></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <th scope="row">Name</th>
            <td>{{ search_result['name'] }}</td>
        </tr>
        {% if 'preferredUsername' in search_result %}
        <tr>
            <th scope="row">Username</th>
            <td>{{ search_result['preferredUsername'] }}</td>
        </tr>
        {% endif %}
        <tr>
            <th scope="row">Type</th>
            <td>{{ search_result['type'] }}</td>
        </tr>
    </tbody>
</table>

<div class="mt-3">
    <a href="{{ url_for('forgefed_ns.federation_follow', actor_uri=search_result['id']) }}" class="mr-2">
        Follow
    </a>

    {% if search_result['type'] == 'Project' %}

        <a href="{{ url_for('forgefed_ns.federation_submit_ticket', actor_uri=search_result['id']) }}" class="mr-2">
            Submit ticket
        </a>
        <a href="" class="mr-2">
            Send patch
        </a>

    {% endif %}
</div>
